<%--
  Created by IntelliJ IDEA.
  User: bryant
  Date: 10/31/12
  Time: 2:34 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="code" uri="/WEB-INF/tld/code.tld" %>
<title>修改商品</title>
<script type="text/javascript">
    $(document).ready(function(){
        $("#productUpdatet").validationEngine('attach', {
            relative: true,
            overflownDIV:"#divOverflown",
            promptPosition:"bottomLeft"
        });
    });
</script>
<div id="main-content">
    <s:if test="hasActionMessages()">
        <div class="notification success png_bg"> <a href="#" class="close"><img src="<%=request.getContextPath()%>/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
            <div> <s:actionmessage/></div>
        </div>
    </s:if>
    <div class="content-box">
        <div class="content-box-header" align="center">
            <h3>修改商品</h3>
            <ul class="content-box-tabs">
                <li><a href="#tab1" class="default-tab">输入表单</a></li>
            </ul>
            <div class="clear"></div>
            <div class="clear"></div>
        </div>
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">

                <form action="product_update" id="productUpdatet" method="post">
                    <s:hidden name="product.id"/>
                    <table>
                        <tr>
                            <td width="15%"><label>商品名称</label></td>
                            <td><s:textfield name="product.productName"  cssClass="text-input small-input validate[required]"/><br/>
                                <%--<small>输入商品名称</small>--%>
                            </td>
                        </tr>
                        <tr>
                            <td><label>输入商品编号</label></td>
                            <td><s:textfield name="product.productNo" cssClass="text-input small-input validate[required]"/></td>
                        </tr>
                        <tr>
                            <td>
                                <label>商品种类</label>
                            </td>
                            <td><code:codeSelect name="product.categoryId" cdTypeId="2" headerKey="" headerValue="请选择" cssClass="validate[required]"/></td>
                        </tr>
                        <tr>
                            <td><label>商品重量</label></td>
                            <td><s:textfield name="product.weight" cssClass="text-input validate[required,custom[number]]" size="5"/> &nbsp; <code:codeSelect name="product.measureId" cdTypeId="3" headerKey="" headerValue="请选择" cssClass="validate[required]"/>
                            </td>
                        </tr>
                        <tr>
                            <td><label>零售价</label></td>
                            <td><s:textfield name="product.salePrice" cssClass="text-input validate[required,custom[number]]" size="10"/> 元&nbsp;

                            </td>
                        </tr>
                        <tr>
                            <td><label>批发价</label></td>
                            <td><s:textfield name="product.tradPrice" cssClass="text-input validate[required,custom[number]]" size="10"/> 元&nbsp;

                            </td>
                        </tr>
                        <tr>
                            <td><label>商品描述</label></td>
                            <td><s:textarea class="text-input textarea" name="product.description" rows="5"></s:textarea>
                            </td>
                        </tr>
                        <tr>
                            <td><label>商品品牌</label></td>
                            <td colspan="3">
                                <code:codeSelect name="product.brandId" cdTypeId="1" headerKey="" headerValue="请选择" cssClass="validate[required]" />
                                </td>
                        </tr>
                        <tr>
                            <td><label>优惠率</label></td>
                            <td>%&nbsp;<s:textfield name="product.concessionrate" cssClass="text-input validate[required,custom[number],max[100]]"
                                                                   size="5"/>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2"><input class="button" align="center" type="submit" value="修改" />&nbsp;<input class="button" align="center" type="reset" value="重设" /></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>